package operation.command.obj;

import operation.command.abs.ICommand;

public class LightOffCommand implements ICommand {
    // 聚合一个接收者
    Light light;

    public LightOffCommand(Light light) {
        this.light = light;
    }

    @Override
    public void execute() {
        light.off();
    }

    @Override
    public void undo() {
        light.on();
    }
    
}